
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php

if(!isset($_SESSION['UserName']))
{
//	include "formdangnhap.php"; 
echo "<script language='javascript'>alert(' Bạn phải đăng nhập !'); location.href='../index.php';</script>";
}


  require_once("connect/dbcon.php");
  $idLM=$_GET["idLM"];
  
  $sql="select * from loaimay where idLM=$idLM";
  $kq=mysql_query($sql,$link);
  if (mysql_num_rows($kq)>0)
  {
  	$dong=mysql_fetch_array($kq);
	$idLoai=$dong["idLM"];
	$TenLoai=$dong["TenLoai"];

  }
  else
  {
	$idLM="";
	$TenMay="";
  }
?>
<form id="form1" name="form1" method="post" action="admin/ktsualoaimay.php">
<table width="500" border="1" bgcolor="#FFC">
  <tr>
    <td colspan="2">Sửa Loại Máy</td>
    
  </tr>
  <tr>
    <td>idLM :</td>
    <td><input name="idLM" type="text" id="idLM" disabled="disabled" value="<?php echo $idLM;?>" />
    	   <input name="idLM1" type="hidden" value="<?php echo $idLM; ?>"></td>
  </tr>
  <tr>
    <td>TenLoai :</td>
    <td><input name="TenLoai" type="text" id="TenLoai" value="<?php echo $TenLoai; ?>" /></td>
  </tr>
  <tr>
    <td><input type="button" value="Quay Về" onclick="history.back()" /></td>
    <td><input type="submit" value="Lưu" /></td>
  </tr>
</table>




     

      
   
   
  
</form>
</body>
</html>